//
//  SypXAppDelegate.m
//  SypX
//
//  Created by Luv Khemani on 5/7/10.
//  Copyright __MyCompanyName__ 2010. All rights reserved.
//

#import "SypXAppDelegate.h"
#import <UIKit/UIKit.h>
#import "GLView.h"

#include "CanvasiPhoneGL.h"

@implementation SypXAppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

    // Override point for customization after application launch
	CGRect screenBounds = [[UIScreen mainScreen] bounds];//retrieve screen size	
	
	
	window = [[UIWindow alloc] initWithFrame: screenBounds];//create a window covering full screen
	glView = [[GLView alloc] initWithFrame: screenBounds];	//Make a GLView also covering full screen	

	SypX::CanvasIPhoneGL::registerWindowView(glView, window);		//Make sure our canvas has access to window/view

	
	[window addSubview:glView];			//Add our glview to the window
    [window makeKeyAndVisible];			//make window visible and active
	
	return YES;
}

- (void) audioPlayerBeginInterruption: (AVAudioPlayer *) player 
{
    
	
}

- (void) audioPlayerEndInterruption: (AVAudioPlayer *) player 
{
   

}


- (void)dealloc {
	
	[glView release];
    [window release];		 
    [super dealloc];
}


@end
